package com.xebest.web.mapper.read;

import com.xebest.web.form.XeVenOrderEnteringLogisticsForm;
import com.xebest.web.model.XeVenOrderLogisticsDetail;
import com.xebest.web.view.XeVenOrderEnteringLogisticsDetailView;
import com.xebest.web.view.XeVenOrderEnteringLogisticsView;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface XeVenOrderEnteringLogisticsReadMapper {

    /**
     * 查询列表
     *
     * @author 袁世林
     */
    List<XeVenOrderEnteringLogisticsView> queryEnteringLogisticsList(XeVenOrderEnteringLogisticsForm form);


    /**
     * 根据订单号查询物流相关信息
     *
     * @param form orderId:订单号
     *             logsCode:物流单号
     * @author 袁世林
     */
    XeVenOrderEnteringLogisticsView queryOrderLogisticsInfo(XeVenOrderEnteringLogisticsForm form);


    /**
     * 根据物流单号查询物流详情信息
     *
     * @param form logsCode:物流单号
     * @author 袁世林
     */
    List<XeVenOrderEnteringLogisticsDetailView> queryEnteringLogisticsDetailList(XeVenOrderEnteringLogisticsForm form);

    /**
     * 判断该订单号是否已经创建物流 :0.自动录入 1.手工录入生效 2.手工录入未生效',如果是1，则不能创建
     *
     * @param orderId
     * @return createLogisticType
     * @author 袁世林
     */
    Integer queryOrderLogisticsCreateLogisticType(@Param("orderId") String orderId);


    /**
     * 查询新建的物流单详情，让商城移动端展示
     *
     * @param orderId
     * @return List<XeVenOrderLogisticsDetail>
     * @author 袁世林
     */
    List<XeVenOrderLogisticsDetail> queryEnteringLogisticsDetailListByOrderId(@Param("orderId") String orderId);


    /**
     * 查询最近的物流单详情，让商城移动端展示
     *
     * @param userId
     * @return XeVenOrderLogisticsDetail
     * @author 袁世林
     */
    XeVenOrderLogisticsDetail getLatestLogistics(@Param("userId") String userId);

    /**
     * 根据主键ID查询物流单信息
     *
     * @param form id
     * @return XeVenOrderEnteringLogisticsView
     * @author 袁世林
     */
    XeVenOrderEnteringLogisticsView queryOrderLogisticsInfoById(XeVenOrderEnteringLogisticsForm form);


}
